package lianxi4;

import java.util.ArrayList;

public class StudentOpeator1 implements StudentOpeator{


    @Override
    public void printAllStudents(ArrayList<Student> students) {
        for (Student student : students) {
            System.out.println(student.toString());
        }
    }

    @Override
    public void printAllScores(ArrayList<Student> students) {
        double count = 0.0;
        for (Student student : students) {
            count += student.getScore();

        }
        System.out.println("学生平均成绩 ：" + count/students.size());
    }
}
